Add tool for Makefile target more-clean.
authoroliskoli <oliskoli>
Sat, 22 Jul 2006 16:25:36 +0000 (16:25 +0000)
committeroliskoli <oliskoli>
Sat, 22 Jul 2006 16:25:36 +0000 (16:25 +0000)
'make more-clean' (mkmoreclean) deletes all files listed in .cvsignore files.

Makefile.in
tools/mkmoreclean [new file with mode: 0755]

index c47dd73750a019777a22d6379d3710d21232c1c6..224945defffc8b76605361524f9fd8d2a0a91c63 100644 (file)
@@ -103,6 +103,9 @@ jeeps/gpslibusb.o:
 clean:
        rm -f $(OBJS) gpsbabel gpsbabel.exe
 
+more-clean: clean
+       tools/mkmoreclean
+
 check:
        ./testo
 
diff --git a/tools/mkmoreclean b/tools/mkmoreclean
new file mode 100755 (executable)
index 0000000..030e7c1
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+#
+# delete all files listed in .cvsignore
+#
+
+find . -type d | 
+while read dirname; do
+       test -s "$dirname/.cvsignore" || continue
+       while read filemask; do
+               test -z "$filemask" && continue
+               cmd="rm -fv $dirname/$filemask"
+               ${cmd}
+       done < "$dirname/.cvsignore"
+done